package cn.edu.scau.cmi.hekaimin.client;

import java.net.URL;

import javafx.application.Application;
import javafx.fxml.FXMLLoader;
import javafx.fxml.JavaFXBuilderFactory;
import javafx.scene.Parent;
import javafx.scene.Scene;
import javafx.stage.Stage;

public class MultitonClient extends Application {

	@Override
	public void start(Stage primaryStage) throws Exception {
		try {    
            URL location = getClass().getResource("../multiton/Multiton.fxml");
			FXMLLoader fxmlLoader = new FXMLLoader();
	        fxmlLoader.setLocation(location);
	        fxmlLoader.setBuilderFactory(new JavaFXBuilderFactory());
	        Parent root = fxmlLoader.load();
			Scene scene = new Scene(root);
			scene.getStylesheets().add(getClass().getResource("../multiton/application.css").toExternalForm());
			primaryStage.setScene(scene);
			
			primaryStage.setResizable(false);//设置不能窗口改变大小
			primaryStage.setTitle("多例模式");//设置标题
			primaryStage.show();
        } catch(Exception e) {
            e.printStackTrace();
        }		
	}
	public static void main(String[] args) {
		// TODO Auto-generated method stub
		launch(args);
	}
}
